package test.myorm.core;

import java.util.List;

public class Sql {
	
	public static final int SQL_SELECT = 1;
	public static final int SQL_INSERT = 2;
	public static final int SQL_UPDATE = 3;
	public static final int SQL_DELETE = 4;
	
	public static final int ID_NONE = 0;
	public static final int ID_GENERATE = 1;
	public static final int ID_SELECT = 2;
	
	private int type; //1 select 2 insert 3 update 4 delete
	private String sql;
	private Parameter parameter;
	private ResultMap resultMap;
	private int returnIdType;//0 不返回id 1 数据库自增 2 走sql查
	private String idProperty;//id属性
	private String idSql;//获取id的sql
	private Configuration configuration;
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public String getSql() {
		return sql;
	}
	public void setSql(String sql) {
		this.sql = sql;
	}
	public ResultMap getResultMap() {
		return resultMap;
	}
	public void setResultMap(ResultMap resultMap) {
		this.resultMap = resultMap;
	}
	public int getReturnIdType() {
		return returnIdType;
	}
	public void setReturnIdType(int returnIdType) {
		this.returnIdType = returnIdType;
	}
	public String getIdProperty() {
		return idProperty;
	}
	public void setIdProperty(String idProperty) {
		this.idProperty = idProperty;
	}
	public String getIdSql() {
		return idSql;
	}
	public void setIdSql(String idSql) {
		this.idSql = idSql;
	}
	public Parameter getParameter() {
		return parameter;
	}
	public void setParameter(Parameter parameter) {
		this.parameter = parameter;
	}
	public Configuration getConfiguration() {
		return configuration;
	}
	public void setConfiguration(Configuration configuration) {
		this.configuration = configuration;
	}
	@Override
	public String toString() {
		return "Sql [type=" + type + ", sql=" + sql + ", parameter=" + parameter + ", resultMap="
				+ resultMap + ", returnIdType=" + returnIdType + ", idProperty=" + idProperty + ", idSql=" + idSql
				+ "]";
	}
	
}